{{--头像--}}
<div class="avatar mdui-text-center">
    @if($info->user_id == Session::get('user.id'))
        <a mdui-dialog="{target: '#touxiang'}" style="cursor: pointer">
            <img class="mdui-img-circle mdui-hoverable" src="{{asset($info->avatar)}}"
                 alt="用户头像">
        </a>
        <a mdui-dialog="{target: '#beijing'}" class="change-bgb mdui-btn mdui-color-yellow-100 mdui-ripple">
            修改背景
        </a>
    @else
        <a style="cursor: pointer">
            <img class="mdui-img-circle mdui-hoverable" src="{{asset($info->avatar)}}"
                 alt="用户头像">
        </a>
    @endif
    <div class="mdui-dialog mdui-p-a-3 mdui-typo" id="touxiang">
        <img class="mdui-img-circle mdui-hoverable mdui-m-b-2" src="{{asset($info->avatar)}}"
             alt="用户头像">
        <form action="{{url('/u/'.Session::get('user.id').'/edit/photo')}}" method="post"
              enctype="multipart/form-data" class="mdui-p-a-2 mdui-m-b-2 mdui-shadow-2">
            {{csrf_field()}}
            <label class="file">
                <input type="file" class="mdui-btn" name="photo" value="">
            </label>
            <button type="submit" class="mdui-btn mdui-ripple mdui-color-blue">提交</button>
            <p class="mdui-typo-caption-opacity mdui-m-t-1">只支持JPG、PNG、GIF，大小不超过1M</p>
            <p class="mdui-typo-caption-opacity">友情提示:图片长宽比接近1:1，头像更美观</p>
        </form>
    </div>

    <div class="mdui-dialog mdui-p-a-3 mdui-typo" id="beijing">
        <div class="mdui-dialog-title mdui-text-center">修改背景</div>
        <form action="{{url('/u/'.Session::get('user.id').'/edit/bgd')}}" method="post"
              enctype="multipart/form-data" class="mdui-p-a-2 mdui-m-b-2 mdui-shadow-2">
            {{csrf_field()}}
            <label class="file">
                <input type="file" class="mdui-btn" name="bgd" value="">
            </label>
            <button type="submit" class="mdui-btn mdui-ripple mdui-color-blue">提交</button>
            <p class="mdui-typo-caption-opacity mdui-m-t-1">只支持JPG、PNG、GIF，大小不超过2M</p>
        </form>
    </div>
    <p class="mdui-typo-title">{{$info->nickname}}</p>
</div>